home *** CD-ROM | disk | FTP | other *** search
- vs.1.1
-
- ;Vertex packing
- ;dcl_position v0
- ;dcl_normal v1
-
- ;Constant map from the NSF.
- ;CM_Defined WorldViewProj 0 0
- ;CM_Defined WorldView 4 4
- ;CM_Constant Half 5 1 0.5,0.5,0.5,0.5
- ;CM_Constant Zero 6 1 0.0,0.0,0.0,0.0
-
- ;Transform normal to viewspace
- ;m4x4 r10, v1, c4
- mov r10, v1
-
- ; Shouldn't be necessary to normalize normal since we hopefully got an orthogonal transform and unit source normals
-
- ;Expand normal to texture coords (N * 0.5f + 0.5f)
- ;mad r10, r10, c5, c5
-
- ;Calculate environment texture coords from worldspace normal
- mov oT0.xy, r10.xy
-
- ;Transform position to clip space
- m4x4 oPos, v0, c0